﻿<!DOCTYPE html>
<html>
<head>
<title>组件录入</title>
<meta charset="utf-8" />
<meta http-equiv="Content-Language" content="zh-CN" />
<meta name="Keywords" content="" />
<meta name="Description" content="" />
<link rel="stylesheet" href="css/style.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	$("#form1 :input[type=text]").val("");
	$("#form1 textarea").val("");
	$("#form1").bind("submit", function(){
		$.ajax({
			type:'POST',
			url:'input.php',
			data:$("#form1").serialize(),
			success: function(){
				window.open("demo/" + $("#form1 :input[name=mid]").val() + ".html");
				//alert("录入成功！");
				$("#form1 :input[type=text]").val("");
				$("#form1 textarea").val("");
			}
		});
		return false;
	});
});   


</script>


</head>
<body>
  <header class="header">
	<h1>MM<sup>beta</sup></h1>
  </header>
  <aside class="side-bar">
	<ul class="main-menu">
	  <li class="current"><span class="icon-new"><i class="h"></i><i class="v"></i></span><a href="##">新增组件</a></li>
	  <li><span class="icon-list"><i class="ht"></i><i class="hm"></i><i class="hb"></i></span><a href="list.html">组件列表</a></li>
	</ul>
  </aside>
  <div class="content">
	<div class="mod-form  form_private">
	  <form  action="input.php" method="post" id="form1">
		<fieldset>
			<legend>组件录入</legend>
			<div class="fm_inner_area">
				<div class="fm_item">
					<label class="fm_label"><em class="fm_require">*</em>所属业务：</label>
					<select><option>--请选择组件所属业务--</option></select>
				</div>
				<div class="fm_item">
					<label class="fm_label"><em class="fm_require">*</em>组件ID：</label>
					<input type="text" class="i_text" name="mid"/>
				</div>

				<div class="fm_item">
					<label class="fm_label"><em class="fm_require">*</em>组件名称：</label>
					<input type="text" class="i_text"  name="cname"/>
				</div>

				<div class="fm_item">
					<label class="fm_label"><em class="fm_require">*</em>htmlCode：</label>
					<textarea name="htmlCode"></textarea>
				</div>

				<div class="fm_item">
					<label class="fm_label"><em class="fm_require">*</em>cssCode：</label>
					<textarea name="cssCode"></textarea>
				</div>				
				<div class="fm_item">
					<label class="fm_label" title="用于生成DEMO"><em class="fm_require">*</em>Reset：</label>
					<label><input type="radio"/>默认</label> <label><input type="radio"/>自定义reset文件</label> <label><input type="radio"/>自定义reset代码</label> <label><input type="radio"/>不使用reset</label>
				</div>				
				<div class="fm_item">
					<label class="fm_label"></label>
					<button id="submit">提交</button>
				</div>				
			</div>
		</fieldset>
	  </form>
	</div>

  </div>
</body>
</html>